fenzi = 2
fenmu = 1
sum = 0
for i in range(20):
    sum = sum + fenzi/fenmu
    newfenzi = fenzi+fenmu
    newfenmu = fenzi
    fenzi = newfenzi
    fenmu = newfenmu
print(sum)

# i = 2 # 分子
# j = 1 # 分母
# s = 0 # 保存求和结果
# for k in range(20):
#     s = s + i/j
#     i,j = i+j,i
# print(s)

